const hx = require("hbuilderx");

function getTheme(){
    let config = hx.workspace.getConfiguration();
    let colorScheme = config.get('editor.colorScheme');
    return colorScheme;
}

function getThemeColor() {
    const colors = {
        'Monokai': {
            background: 'rgb(39,40,34)',
            inputColor: 'rgb(255,254,250)',
            fontColor: 'rgb(179,182,166)',
            lineColor: 'rgb(23,23,23)',
            liHoverBackground: 'rgb(78,80,73)',
            menuBackground: 'rgb(83,83,83)',
        },
        'Atom One Dark': {
            background: 'rgb(40,44,53)',
            inputColor: 'rgb(44,49,60)',
            fontColor: 'rgb(179,182,166)',
            lineColor: 'rgb(33,37,43)',
            liHoverBackground: 'rgb(44,47,55)',
            menuBackground: 'rgb(50,56,66)',
        },
        'Default': {
            background: '#faf6e6',
            inputColor: '#454545',
            fontColor: '#333',
            lineColor: 'rgb(225,212,178)',
            liHoverBackground: 'rgb(224,237,211)',
            menuBackground: 'rgb(255,252,243)',
        }
    }
    const theme = getTheme();
    return colors[theme]
};

module.exports = {
    getTheme,
    getThemeColor
}